﻿using BCCommon.OAEnums;
using BCDto.OA.Attendance.AttendanceLocation;
using BCDto.OA.Attendance.AttendanceWiFi;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace BCDto.OA.Attendance.AttendanceGroup
{
    /// <summary>
    /// 考勤组请求信息
    /// </summary>
    public class AttendanceGroupRequestDto
    {
        /// <summary>
        /// 考勤组名称
        /// </summary>		      
        [Display(Name = "考勤组名称")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string GroupName { get; set; }

        /// <summary>
        /// 考勤类型，FIXED为固定排班，TURN为轮班排班，NONE为无班次
        /// </summary>	
        [Display(Name = "考勤类型")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public AttendanceType Type { get; set; }
        /// <summary>
        /// 班次Id
        /// </summary>		      
        [Display(Name = "班次Id")]
        public long ClassId { get; set; }

        /// <summary>
        /// 考勤组负责人
        /// </summary>	
        [Display(Name = "考勤组负责人")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string[] ManagerIds { get; set; }

        /// <summary>
        /// 无需考勤人员
        /// </summary>	
        [Display(Name = "无需考勤人员")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string[] IgnoreMemberIds { get; set; }

        /// <summary>
        /// 设置部门
        /// </summary>	
        [Display(Name = "设置部门")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public string[] DepartmentIds { get; set; }

        /// <summary>
        /// 是否默认考勤组
        /// </summary>	
        [Display(Name = "是否默认考勤组")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public bool IsDefault { get; set; }

        /// <summary>
        /// 生效时间
        /// </summary>		      
        [Display(Name = "生效时间")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public DateTime? EffectiveDate { get; set; }

        /// <summary>
        /// 是否自动打卡
        /// </summary>	
        [Display(Name = "是否自动打卡")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public bool IsAutoCheck { get; set; }

        /// <summary>
        /// 上班打卡后多少分钟可打下班卡
        /// </summary>
        [Display(Name = "外勤打卡需填写备注")]
        [Required(ErrorMessage = "{0} 不能为空")]
        public int LaterMinutes { get; set; }
        /// <summary>
        /// 外勤打卡需填写备注
        /// </summary>		      
        [Display(Name = "外勤打卡需填写备注")]
        public int IsOuterRemark { get; set; }


        /// <summary>
        /// 成员人数
        /// </summary>	
        [Display(Name = "成员人数")]
        public int MemberCount { get; set; }

        /// <summary>
        /// 允许外勤打卡
        /// </summary>		      
        [Display(Name = "是否允许外勤打卡")]
        public int IsAllowOuterCheck { get; set; }

        /// <summary>
        /// 打卡地址
        /// </summary>		      
        [Display(Name = "打卡地址")]
        public List<AttendanceLocationRequestDto> Locations { get; set; } = new List<AttendanceLocationRequestDto>();

        /// <summary>
        /// 打卡Wifi
        /// </summary>		      
        [Display(Name = "打卡打卡Wifi")]
        public List<AttendanceWiFiRequestDto> Wifi { get; set; } = new List<AttendanceWiFiRequestDto>();
    }
}
